export let formatTime = (date: string) => {
    let time = new Date(date)

    let y = time.getFullYear()
    let m = time.getMonth() + 1
    let d = time.getDate()
    let h = time.getHours()
    let i = time.getMinutes()
    let s = time.getSeconds()
    return (
        // [y, m, d].map(item => String(item).padStart(2, '0')).join('-') +
        // '\xa0' +
        // [h, i, s].map(item => String(item).padStart(2, '0')).join(':')
        [y, m, d].map(item => String(item).padStart(2, '0')).join('-')
    )
}
export let formatTimeAll = (date: string) => {
    let time = new Date(date)

    let y = time.getFullYear()
    let m = time.getMonth() + 1
    let d = time.getDate()
    let h = time.getHours()
    let i = time.getMinutes()
    let s = time.getSeconds()
    return (
        [y, m, d].map(item => String(item).padStart(2, '0')).join('-') +
        '\xa0' +
        [h, i, s].map(item => String(item).padStart(2, '0')).join(':')
    )
}
export let formatTimeAllA = (date: string) => {
    let time = new Date(date)

    let y = time.getFullYear()
    let m = time.getMonth() + 1
    let d = time.getDate()
    let h = time.getHours()
    let i = time.getMinutes()
    let s = time.getSeconds()
    return (
        [y, m, d].map(item => String(item).padStart(2, '0')).join('-') +
        ' ' +
        [h, i, s].map(item => String(item).padStart(2, '0')).join(':')
    )
}
export let formatTimeHan = (date: any) => {
    let time = new Date(date)

    let y = time.getFullYear()
    let m = time.getMonth() + 1
    let d = time.getDate()
    let h = time.getHours()
    let i = time.getMinutes()
    let s = time.getSeconds()
    return (
        [y, m, d].map(item => String(item).padStart(2, '0')).join('') +
        [h, i, s].map(item => String(item).padStart(2, '0')).join('')
    )
}